feat: Implement support for ToMany relation array syntax in URL patterns#355
feat: Implement support for ToMany relation array syntax in URL patterns#355boazpoolman merged 11 commits intopluginpal:masterfrom
Conversation
🦋 Changeset detectedLatest commit: a27ed48 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
…, and update playground content types with new relations and fields.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #355 +/- ##
==========================================
- Coverage 35.96% 34.99% -0.97%
==========================================
Files 2 2
Lines 723 743 +20
Branches 172 177 +5
==========================================
Hits 260 260
- Misses 368 389 +21
+ Partials 95 94 -1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
boazpoolman
left a comment
There was a problem hiding this comment.
Thank you @candidosales.
My apologies that it took so long to review this PR.
I've made some changes and it is ready to merge now.
Will update you as soon as it is released.
|
@boazpoolman Thanks so much! This update will update my current project :D |
|
Sounds good @candidosales! It's part of version 1.9.0. Thanks again for your contribution <3 |
What does it do?
This pull request introduces enhanced support for relation fields—especially "ToMany" (array) relations—in the URL pattern service, along with expanded test coverage and updates to content type schemas to reflect these capabilities. The changes improve how URL patterns can reference and resolve fields within related entities, including those with array indices and dashed/underscored relation names. Additionally, editor and VSCode configuration files are updated for consistency and improved developer experience.
Enhancements to URL Pattern Service:
[categories[0].slug]and handling both dashed and underscored relation names. [1] [2]Testing Improvements:
Schema Updates:
private-categoryandtestcontent type schemas to use many-to-many relations, addedurl_aliasrelations, and improved field naming consistency. [1] [2]Developer Experience:
.editorconfigand VSCode extension recommendations to enforce consistent code style and encourage use of EditorConfig. [1] [2]testcontent type.Why is it needed?
Describe the issue you are solving.
How to test it?
Running the application using
bun run playground:developornpm run playground:developCleanShot.2025-11-23.at.11.32.16.mp4
Add validation when the user omits the array index.
Related issue(s)/PR(s)
Let us know if this is related to any issue/pull request